package com.example.common;


import com.alibaba.fastjson.JSON;

/**
 * @author dangwen1
 * @date 2022年01月06日 11:15
 * @description
 */
public class Bubble {
    public static void main(String[] args) {
        int[] array = new int[]{1,21,2134,231,312,4,45,65,9,67,8,8,};
        for (int i = 0; i < array.length - 1; i++) {
            for (int j = i; j < array.length; j++) {
                if (array[i] < array[j]) {
                    int temp = array[i];
                    array[i] = array[j];
                    array[j] = temp;
                }
            }
        }
        System.out.println(JSON.toJSONString(array));
    }
}
